<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>    
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	
		
		<form:form modelAttribute="goods" action="${pageContext.request.contextPath }/goods" method="post">
			
			
				<c:if test="${goods.id == null }"><h1 id="h">新增商品</h1></c:if>
				<c:if test="${goods.id != null }">
					<h1 id="h">修改商品</h1>
					<form:hidden path="id"/>
					<input type="hidden" name="_method" value="put"/>
				</c:if>
			
			<p>商品编号：<form:input path="goodsCode"/></p>
			<p>商品名称：<form:input path="goodsName"/></p>
			<p>商品价格：<form:input path="goodsPrice"/></p>
			<button>提交</button>	
					
		</form:form>
		
</body>
</html>